package net.vistiyos.util;

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class FilesTube {
	
	private static final String DATABASE_TABLE="historial";
	private static final String ID_FIELD="idquery";
	private static final String QUERY_FIELD="query";
	private static final String CREATEDATABASE="CREATE TABLE "+DATABASE_TABLE+"("
			+ID_FIELD+" integer primary key,"
			+QUERY_FIELD+" varchar(255) not null)";
    
    public static void onCreate(SQLiteDatabase db){
    	db.execSQL(FilesTube.CREATEDATABASE);
    }
    
    public static void onUpgrade(SQLiteDatabase database, int oldVersion,
			int newVersion) {
		Log.w(FilesTube.class.getName(), "Upgrading database from version "
				+ oldVersion + " to " + newVersion
				+ ", which will destroy all old data");
		database.execSQL("DROP TABLE IF EXISTS "+DATABASE_TABLE);
		onCreate(database);
	}
    
     
    

}
